<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <title>商务条件预申请驳回原因</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">
    <style type="text/css">
        textarea {
            outline: none;
            resize: none;
        }
        .tijiaoBtn {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50px;
            line-height: 50px;
            background: #228bee;
            color: #fff;
            text-align: center;
            font-weight: bold;
            font-size: 16px;
        }

        .touBtn {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 50px;
            line-height: 50px;
            background: #2a8cec;
            color: #fff;
            text-align: center;
            font-weight: bold;
            font-size: 16px;
            margin: 0 auto;
            z-index: 11111;
        }

        .touBtn div {
            float: left;
            width: 50%;
            box-sizing: border-box;
            font-size: 16px;
        }

        .touBtn .line {
            height: 24px;
            width: 1px;
            background: #fff;
            position: absolute;
            left: 50%;
            top: 13px;
        }
    </style>
</head>
<body>
<div id="app" style="text-align:center;width:300px;height:200px;">
    <textarea style="width:290px;height:150px;margin:0 auto;margin-top:5px;" v-model="reason"></textarea>
    <br/>

    <!--<div   class="south no-print"      style="height:50px;line-height:50px;text-align:center;bottom:0;position: fixed;width: 100%;">
        <div value="" class=""    @click="auditReturn"
             style="background-color: #228bee;margin-left:0px;width: 100%;float:left;color:#fff;font-size: 14px;position: relative">
            确定驳回
        </div>
    </div>-->
    <div class="touBtn"  >
        <div style="width: 100%;"    @click="auditReturn" >确定驳回</div>
    </div>
 </div>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
 <script src="/dist/js/oaApp.js?t=54c6b89c"></script>

<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script>
    $.ajaxSetup({
        global: true,
        type: "POST",
        cache: false,
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        beforeSend: function () {
        },
        complete: function () {

        },
        error: function (e) {
            alert('error' + e.responseText);
        }
    });
    $.extend($.wyui, {
        page: {
            urlParams: null,
            queryParams: {
                requestPage: 1,
                pageSize: 30
            },
            dataUrl: '',
            createQueryParams: function () {
            },
            getByPage: function (type) {
                $.ajax({
                    url: $.wyui.page.dataUrl,
                    data: JSON.stringify($.wyui.page.queryParams),
                    beforeSend: function () {

                    },
                    complete: function () {
                    },
                    success: function (r) {
                        $.wyui.page.queryParams.requestPage++;

                        if (r.data.sendData.pager && r.data.sendData.pager.pageCount == 0) {
                            r.data.sendData.pager.pageCount = 1;
                        }
                        if (type == "scroll") {
                            $.wyui.page.getByPage_scroll_callback(r.data.sendData.records);
                        } else {
                            if ($.wyui.page.getByPage_callback_new) {
                                $.wyui.page.getByPage_callback_new(r.data.sendData.records);
                            }
                        }

                    }
                });
            }
        },
        postMethod: function (url, data, callback, sync, id) {
            if (!id) {
                id = "#app"
            }
            $.ajax({
                url: server.ip + url,
                async: sync ? false : true,
                data: JSON.stringify(data),
                beforeSend: function () {

                },
                complete: function () {
                    setTimeout(function () {
                    }, 1000);

                },
                success: function (r) {
                    if (!r.e.code) {
                        callback(r.data.sendData);
                    } else {
                        alert(r.e.desc);
                        JSBridge.call(UI, 'showToast', {title: r.e.desc})
                    }
                },
                error: function (e) {
                    JSBridge.call(UI, 'showToast', {title: e.responseText})
                    alert(url + e.responseText);
                }
            });
        },
    });
</script>
<script type="text/javascript">
    var api = frameElement.api, W = api.opener;

    var app = new Vue({
        el: '#app',
        data: {
            reason: '',
            userId: getUrlParamObj().userId,
            pageType: getUrlParamObj().pageType ? getUrlParamObj().pageType : '',
            openType: getUrlParamObj().openType ? getUrlParamObj().openType : 'top',
            type: '其他原因',
        },
        methods: {
            auditReturn: function () {
                var that = this;
                JSBridge.call(UI, 'showLoading', {})
                if (that.reason&&that.reason!='') {
                    $.wyui.postMethod("/exam/applyAudit.json", {
                        id: getUrlParamObj().id,
                        userId: getUrlParamObj().userId,
                        auditFlag: '2',
                        advise: that.reason
                    }, function () {
                        JSBridge.call(UI, 'hideLoading')
                        //parent.refresh();
                        var param = {
                            backRefresh: true,       //是否返回刷新
                        }
                        JSBridge.call(ROUTER, 'navigateBack', param)
                        api.close();
                    });
                } else {
                    var param = {
                        title: '请输入驳回原因'
                    }
                    JSBridge.call(UI, 'showToast', param)
                    alert("请输入驳回原因")
                }
            },
        }
    });
</script>
</body>
</html>